<?php

namespace App;

use Illuminate\Foundation\Auth\Type as Authenticatable;
use Illuminate\Database\Eloquent\Model;
class Type extends Model
{
	public $timestamps = false;
	public $table='type';
    public function insert_do($arr=array()){
    	return self::insert($arr);
    }
    public function getAll(){
    	return self::where('type_status',0)->paginate(5);
    }
    public function NgetAll(){
    	return self::where('type_status',0)->get();
    }
        public function getOne($id){
    	return self::where('type_id',$id)->get();
    }
        public function updateOne($id,$arr=array()){
        return self::where('type_id',$id)->update($arr);
    }
    public function getField($id){
		return self::where('type_id',$id)->update(['type_status'=>1]);
	}
}